package com.lwm.annotation;

import org.junit.Test;

import java.lang.reflect.Method;

/**
 * @author liweimin
 * @date 2020/9/15 16:23
 * @description
 */
public class MyAnnotationTest {
    @Test
    public void test01() throws NoSuchMethodException {
        Class<MyAnnotationTest> clazz = MyAnnotationTest.class;
        Method show = clazz.getMethod("show");
        MyAnnotation[] annotations = show.getAnnotationsByType(MyAnnotation.class);
        for(MyAnnotation annotation:annotations){
            System.out.println(annotation.value());
        }
    }
    @MyAnnotation("d")
    @MyAnnotation("sa")
    @MyAnnotation("assays")
    public void show(){

    }
}
